home *** CD-ROM | disk | FTP | other *** search
/ Amiga Magazin: Amiga-CD 1996 March / Amiga-CD 1996 #3.iso / amiga_technologies / include_i / libraries / lowlevel.i < prev    next >
Text File  |  1996-01-19  |  6KB  |  201 lines

  1.     IFND    LIBRARIES_LOWLEVEL_I
  2. LIBRARIES_LOWLEVEL_I  SET 1
  3. **
  4. **    $VER: lowlevel.i 40.7 (30.7.93)
  5. **    Includes Release 40.16
  6. **
  7. **    lowlevel.library interface structures and definitions
  8. **
  9. **    (C) Copyright 1993-1995 ESCOM AG
  10. **    All Rights Reserved
  11. **
  12.  
  13. ;---------------------------------------------------------------------------
  14.  
  15.     IFND EXEC_TYPES_I
  16.     INCLUDE "exec/types.i"
  17.     ENDC
  18.  
  19.     IFND UTILITY_TAGITEM_I
  20.     INCLUDE "utility/tagitem.i"
  21.     ENDC
  22.  
  23. ;---------------------------------------------------------------------------
  24.  
  25. ; structure for use with QueryKeys()
  26.    STRUCTURE KeyQuery,0
  27.     UWORD kq_KeyCode
  28.     UWORD kq_Pressed
  29.    LABEL KeyQuery_SIZEOF
  30.  
  31. ;---------------------------------------------------------------------------
  32.  
  33. ; bits in the return value of GetKey()
  34.     BITDEF    LLK,LSHIFT,16
  35.     BITDEF    LLK,RSHIFT,17
  36.     BITDEF    LLK,CAPSLOCK,18
  37.     BITDEF    LLK,CONTROL,19
  38.     BITDEF    LLK,LALT,20
  39.     BITDEF    LLK,RALT,21
  40.     BITDEF    LLK,LAMIGA,22
  41.     BITDEF    LLK,RAMIGA,23
  42.  
  43. ;---------------------------------------------------------------------------
  44.  
  45. ; Tags for SetJoyPortAttrs()
  46. ;
  47. SJA_Dummy      equ (TAG_USER+$00C00100)
  48. SJA_Type      equ (SJA_Dummy+1) ; force type to mouse, joy, game cntrlr
  49. SJA_Reinitialize  equ (SJA_Dummy+2) ; free potgo bits, reset to autosense
  50.  
  51. ; Controller types for SJA_Type tag
  52. SJA_TYPE_AUTOSENSE equ 0
  53. SJA_TYPE_GAMECTLR  equ 1
  54. SJA_TYPE_MOUSE       equ 2
  55. SJA_TYPE_JOYSTK    equ 3
  56.  
  57. ;---------------------------------------------------------------------------
  58.  
  59. ; ReadJoyPort() retunr value definitions
  60.  
  61. ; Port types
  62. JP_TYPE_NOTAVAIL equ (00<<28)         ; port data unavailable
  63. JP_TYPE_GAMECTLR equ (01<<28)         ; port has game controller
  64. JP_TYPE_MOUSE     equ (02<<28)         ; port has mouse
  65. JP_TYPE_JOYSTK     equ (03<<28)         ; port has joystick
  66. JP_TYPE_UNKNOWN  equ (04<<28)         ; port has unknown device
  67. JP_TYPE_MASK     equ (15<<28)         ; controller type
  68.  
  69. ; Button types, valid for all types except JP_TYPE_NOTAVAIL
  70.     BITDEF    JP,BUTTON_BLUE,23     ; Blue - Stop; Right Mouse
  71.     BITDEF    JP,BUTTON_RED,22      ; Red - Select; Left Mouse; Joystick Fire
  72.     BITDEF    JP,BUTTON_YELLOW,21   ; Yellow - Repeat
  73.     BITDEF    JP,BUTTON_GREEN,20    ; Green - Shuffle
  74.     BITDEF    JP,BUTTON_FORWARD,19  ; Charcoal - Forward
  75.     BITDEF    JP,BUTTON_REVERSE,18  ; Charcoal - Reverse
  76.     BITDEF    JP,BUTTON_PLAY,17     ; Grey - Play/Pause; Middle Mouse
  77.  
  78. JP_BUTTON_MASK equ (JPF_BUTTON_BLUE|JPF_BUTTON_RED|JPF_BUTTON_YELLOW|JPF_BUTTON_GREEN|JPF_BUTTON_FORWARD|JPF_BUTTON_REVERSE|JPF_BUTTON_PLAY)
  79.  
  80. ; Direction types, valid for JP_TYPE_GAMECTLR and JP_TYPE_JOYSTK
  81.     BITDEF    JP,JOY_UP,3
  82.     BITDEF    JP,JOY_DOWN,2
  83.     BITDEF    JP,JOY_LEFT,1
  84.     BITDEF    JP,JOY_RIGHT,0
  85.  
  86. JP_DIRECTION_MASK equ (JPF_JOY_UP|JPF_JOY_DOWN|JPF_JOY_LEFT|JPF_JOY_RIGHT)
  87.  
  88. ; Mouse position reports, valid for JP_TYPE_MOUSE
  89. JP_MHORZ_MASK equ (255<<0)      ; horizontal position
  90. JP_MVERT_MASK equ (255<<8)      ; vertical position
  91. JP_MOUSE_MASK equ (JP_MHORZ_MASK|JP_MVERT_MASK)
  92.  
  93. ; Obsolete ReadJoyPort() definitions, here for source code compatibility only.
  94. ; Please do NOT use in new code.
  95.     BITDEF    JP,BTN1,JPB_BUTTON_BLUE
  96.     BITDEF    JP,BTN2,JPB_BUTTON_RED
  97.     BITDEF    JP,BTN3,JPB_BUTTON_YELLOW
  98.     BITDEF    JP,BTN4,JPB_BUTTON_GREEN
  99.     BITDEF    JP,BTN5,JPB_BUTTON_FORWARD
  100.     BITDEF    JP,BTN6,JPB_BUTTON_REVERSE
  101.     BITDEF    JP,BTN7,JPB_BUTTON_PLAY
  102.     BITDEF    JP,UP,JPB_JOY_UP
  103.     BITDEF    JP,DOWN,JPB_JOY_DOWN
  104.     BITDEF    JP,LEFT,JPB_JOY_LEFT
  105.     BITDEF    JP,RIGHT,JPB_JOY_RIGHT
  106.  
  107. ;---------------------------------------------------------------------------
  108.  
  109. ; Tags for SystemControl()
  110. SCON_Dummy       equ (TAG_USER+$00C00000)
  111. SCON_TakeOverSys   equ (SCON_Dummy+0)
  112. SCON_KillReq       equ (SCON_Dummy+1)
  113. SCON_CDReboot       equ (SCON_Dummy+2)
  114. SCON_StopInput       equ (SCON_Dummy+3)
  115. SCON_AddCreateKeys equ (SCON_Dummy+4)
  116. SCON_RemCreateKeys equ (SCON_Dummy+5)
  117.  
  118. ; Reboot control values for use with the SCON_CDReboot tag
  119. CDReboot_On     equ 1
  120. CDReboot_Off     equ 0
  121. CDReboot_Default equ 2
  122.  
  123. ;---------------------------------------------------------------------------
  124.  
  125. ; Rawkey codes returned when using SCON_AddCreateKeys with SystemControl()
  126.  
  127. RAWKEY_PORT0_BUTTON_BLUE    equ    $72
  128. RAWKEY_PORT0_BUTTON_RED    equ    $78
  129. RAWKEY_PORT0_BUTTON_YELLOW    equ    $77
  130. RAWKEY_PORT0_BUTTON_GREEN    equ    $76
  131. RAWKEY_PORT0_BUTTON_FORWARD    equ    $75
  132. RAWKEY_PORT0_BUTTON_REVERSE    equ    $74
  133. RAWKEY_PORT0_BUTTON_PLAY    equ    $73
  134. RAWKEY_PORT0_JOY_UP        equ    $79
  135. RAWKEY_PORT0_JOY_DOWN        equ    $7A
  136. RAWKEY_PORT0_JOY_LEFT        equ    $7C
  137. RAWKEY_PORT0_JOY_RIGHT        equ    $7B
  138.  
  139. RAWKEY_PORT1_BUTTON_BLUE    equ    $172
  140. RAWKEY_PORT1_BUTTON_RED    equ    $178
  141. RAWKEY_PORT1_BUTTON_YELLOW    equ    $177
  142. RAWKEY_PORT1_BUTTON_GREEN    equ    $176
  143. RAWKEY_PORT1_BUTTON_FORWARD    equ    $175
  144. RAWKEY_PORT1_BUTTON_REVERSE    equ    $174
  145. RAWKEY_PORT1_BUTTON_PLAY    equ    $173
  146. RAWKEY_PORT1_JOY_UP        equ    $179
  147. RAWKEY_PORT1_JOY_DOWN        equ    $17A
  148. RAWKEY_PORT1_JOY_LEFT        equ    $17C
  149. RAWKEY_PORT1_JOY_RIGHT        equ    $17B
  150.  
  151. RAWKEY_PORT2_BUTTON_BLUE    equ    $272
  152. RAWKEY_PORT2_BUTTON_RED    equ    $278
  153. RAWKEY_PORT2_BUTTON_YELLOW    equ    $277
  154. RAWKEY_PORT2_BUTTON_GREEN    equ    $276
  155. RAWKEY_PORT2_BUTTON_FORWARD    equ    $275
  156. RAWKEY_PORT2_BUTTON_REVERSE    equ    $274
  157. RAWKEY_PORT2_BUTTON_PLAY    equ    $273
  158. RAWKEY_PORT2_JOY_UP        equ    $279
  159. RAWKEY_PORT2_JOY_DOWN        equ    $27A
  160. RAWKEY_PORT2_JOY_LEFT        equ    $27C
  161. RAWKEY_PORT2_JOY_RIGHT        equ    $27B
  162.  
  163. RAWKEY_PORT3_BUTTON_BLUE    equ    $372
  164. RAWKEY_PORT3_BUTTON_RED    equ    $378
  165. RAWKEY_PORT3_BUTTON_YELLOW    equ    $377
  166. RAWKEY_PORT3_BUTTON_GREEN    equ    $376
  167. RAWKEY_PORT3_BUTTON_FORWARD    equ    $375
  168. RAWKEY_PORT3_BUTTON_REVERSE    equ    $374
  169. RAWKEY_PORT3_BUTTON_PLAY    equ    $373
  170. RAWKEY_PORT3_JOY_UP        equ    $379
  171. RAWKEY_PORT3_JOY_DOWN        equ    $37A
  172. RAWKEY_PORT3_JOY_LEFT        equ    $37C
  173. RAWKEY_PORT3_JOY_RIGHT        equ    $37B
  174.  
  175. ;---------------------------------------------------------------------------
  176.  
  177. ; return value for GetLanguageSelection()
  178. LANG_UNKNOWN    equ 0
  179. LANG_AMERICAN    equ 1    ; American English
  180. LANG_ENGLISH    equ 2    ; British English
  181. LANG_GERMAN    equ 3
  182. LANG_FRENCH    equ 4
  183. LANG_SPANISH    equ 5
  184. LANG_ITALIAN    equ 6
  185. LANG_PORTUGUESE equ 7
  186. LANG_DANISH    equ 8
  187. LANG_DUTCH    equ 9
  188. LANG_NORWEGIAN    equ 10
  189. LANG_FINNISH    equ 11
  190. LANG_SWEDISH    equ 12
  191. LANG_JAPANESE    equ 13
  192. LANG_CHINESE    equ 14
  193. LANG_ARABIC    equ 15
  194. LANG_GREEK    equ 16
  195. LANG_HEBREW    equ 17
  196. LANG_KOREAN    equ 18
  197.  
  198. ;---------------------------------------------------------------------------
  199.  
  200.     ENDC    ; LIBRARIES_LOWLEVEL_I
  201.